#include "SCI_HAL_GB.h"

#define COMM_MAC_ADDRESS 0x1234

#define COMM_MAC_ADDR_HIGH (uint8)(COMM_MAC_ADDRESS >> 8)
#define COMM_MAC_ADDR_LOW (uint8)(COMM_MAC_ADDRESS & 0x00FF)

#define WAIT_FOR_ACK_TIMEOUT 250

#define COMM_SMAC_TX_PACKET_SIZE 24
#define COMM_SMAC_RX_PACKET_SIZE 12

#define COMM_SCI_TX_PACKET_SIZE 7
#define COMM_SCI_RX_PACKET_SIZE 14

#define SMAC_WAITING_FOR_ACK    0x80
#define SMAC_ACK_RECEIVED       0x40
#define SMAC_NO_ACK_RECEIVED    0x20

#define SMAC_DEFAULT_ACK   0xFA 

#define COMM_SCI_RX_REQUEST 0xF0
#define COMM_SCI_TX_REQUEST 0x0F

void vfnComm_BuildSMACPacket (void);

void vfnComm_BuildSCIPacket (void);

void vfnComm_HandleSCIRx (void);

void vfnComm_HandleSCITx (void);